Skip to content

Use declaration markdown#2620

Merged
thomasiles merged 8 commits intomainfrom
use-declaration_markdown
Mar 16, 2026
Merged

Use declaration markdown#2620
thomasiles merged 8 commits intomainfrom
use-declaration_markdown

Conversation

@thomasiles
Copy link
Contributor

@thomasiles thomasiles commented Mar 11, 2026

Switch declarations to markdown not text

Trello card: https://trello.com/c/b8rdhhe4/2836-support-markdown-in-declaration-field

This PR switches to using the markdown editors for declarations in English and Welsh.

The forms:convert_declaration_text_to_markdown has been run in dev, prod and staging and the runner is displaying the declaration_markdown field.

This PR stops using the original field, declaration_text and only uses declaration_markdown. delcaration_text is not dropped from the database or form documents. This allows rollback and also re-running the forms:convert_declaration_text_to_markdown if for some reason we need to.

The declaration_text field can be ignored and dropped and field removed from form_documents in a future, cleanup PR.

image image image

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

@thomasiles thomasiles marked this pull request as ready for review March 11, 2026 11:47
chao-xian
chao-xian previously approved these changes Mar 13, 2026
Copy link
Contributor

@chao-xian chao-xian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and work on the review app

DavidBiddle
DavidBiddle previously approved these changes Mar 16, 2026
Copy link
Contributor

@DavidBiddle DavidBiddle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, tested locally and it all works with the migration task and looks as expected on the live/archived and Welsh pages 🎉

@thomasiles thomasiles added this pull request to the merge queue Mar 16, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 16, 2026
@thomasiles thomasiles added this pull request to the merge queue Mar 16, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 16, 2026
@thomasiles thomasiles dismissed stale reviews from DavidBiddle and chao-xian via 0221a23 March 16, 2026 11:01
@thomasiles thomasiles force-pushed the use-declaration_markdown branch from 0221a23 to 544ef2e Compare March 16, 2026 11:11
Change the declaration page to use the Markdown editor and the
declaration_markdown field instead of a text area and declaration_text.
The view of a live form show show the declaration_markdown instead of
the declaration_text.
The declaration markdown preview should show the new text when there is
no content to preview.
@thomasiles thomasiles force-pushed the use-declaration_markdown branch from 544ef2e to aecef3e Compare March 16, 2026 11:22
@sonarqubecloud
Copy link

@github-actions
Copy link

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2620.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

@thomasiles thomasiles added this pull request to the merge queue Mar 16, 2026
Merged via the queue into main with commit 9348cdc Mar 16, 2026
6 checks passed
@thomasiles thomasiles deleted the use-declaration_markdown branch March 16, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants